<title>model</title>
<div class="layui-fluid">
    <div class="layui-col-md12">
        <!--<form class="layui-form layui-col-md11">-->
            <!--<div class="layui-form-item">-->
                <!--<div class="layui-input-inline">-->
                    <!--<input name="searchName" placeholder="请输入名称" autocomplete="off" class="layui-input">-->
                <!--</div>-->
                <!--<div class="layui-input-inline">-->
                    <!--<a class="layui-btn" lay-submit lay-filter="find">查询</a>-->
                <!--</div>-->
            <!--</div>-->
        <!--</form>-->
        <a class="layui-btn layui-col-md1" lay-submit lay-filter="showAdd">新增</a>
    </div>
    <!--弹出层-->
    <form class="layui-form" style='display:none;' id="add_edit_form">
        <div class="layui-form-item">
            <label class="layui-form-label">选择快递公司</label>
            <div class="layui-input-inline">
                <select name="express_id" id="express_id"></select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">电子面单客户账号</label>
            <div class="layui-input-inline">
                <input name="customer_name" placeholder="请输入电子面单客户账号" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">电子面单密码</label>
            <div class="layui-input-inline">
                <input name="customer_pwd" placeholder="请输入电子面单密码" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">月结编码</label>
            <div class="layui-input-inline">
                <input name="month_code" placeholder="请输入月结编码" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">网点编码</label>
            <div class="layui-input-inline">
                <input name="dot_code" placeholder="请输入网点编码" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">网点名称</label>
            <div class="layui-input-inline">
                <input name="dot_name" placeholder="请输入网点名称" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">发件人公司</label>
            <div class="layui-input-inline">
                <input name="company" placeholder="请输入发件人公司" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">发件人姓名</label>
            <div class="layui-input-inline">
                <input name="name" required lay-verify="required" placeholder="请输入发件人姓名" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">发件人电话</label>
            <div class="layui-input-inline">
                <input name="tel" placeholder="请输入发件人电话" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">发件人手机</label>
            <div class="layui-input-inline">
                <input name="phone" placeholder="请输入发件人手机" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">发件人邮编</label>
            <div class="layui-input-inline">
                <input name="post_code" placeholder="请输入发件人邮编" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">发件人地区</label>
            <div class="layui-input-inline">
                <select name="province" id="province" lay-filter="region"></select>
            </div>
            <div class="layui-input-inline">
                <select name="city" id="city" lay-filter="region"></select>
            </div>
            <div class="layui-input-inline">
                <select name="area" id="area" lay-filter="region"></select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">发件人详细地址</label>
            <div class="layui-input-inline">
                <input name="addr" required lay-verify="required" placeholder="请输入发件人详细地址" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">托寄物</label>
            <div class="layui-input-inline">
                <input name="towing_goods" placeholder="请输入托寄物" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">状态</label>
            <div class="layui-input-block">
                <input type="checkbox" name="status" checked lay-skin="switch" lay-text="开启|关闭">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <a class="layui-btn" id="btn" lay-submit lay-filter="sub">提交</a>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
    <!--数据表格-->
    <div class="layui-col-md12">
        <table id="pageTable" lay-filter="pageTable" lay-data="{id: 'pageTable'}"></table>
    </div>
</div>
<!--添加/编辑签名-->
<script type="text/javascript">
    layui.use('electronics', layui.factory('electronics'));
</script>
<script type="text/html" id="operations">
    <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
    <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="del">删除</a>
</script>
<!--图片模板-->
<script type="text/html" id="imgTpl">
    <img class="layui-upload-img" style="width:40px; height:40px"
         src={{ d.pic_url }}>
</script>
<!--状态码模板-->
<script type="text/html" id="statusTpl">
    <input type="checkbox" value="{{d.id}}" lay-skin="switch" lay-text="开启|关闭" lay-filter="status" {{
           d.status== 1 ? 'checked' : '' }}>
</script>
<!--应用类型模板-->
<script type="text/html" id="typeTpl">
    {{#  if(d.type == '1'){ }}
    <span class="layui-col-md8">1</span>
    {{#  } else if(d.type == '2'){ }}
    <span class="layui-col-md8">2</span>
    {{#  } else if(d.type == '3'){ }}
    <span class="layui-col-md8">3</span>
    {{#  } else { }}
    <span class="layui-col-md8">类型错误</span>
    {{#  } }}
</script>

<style>
    /*列表展示图片时需要添加*/
    .layui-table-cell {
        height: auto;
    }

    #add_edit_form {
        margin-top: 20px;
        margin-right: 20px;
    }

    #image {
        height: 200px;
        width: 200px;
        margin-top: 10px;
        border: 1px solid #e5e5e5;
    }

    input[id=addImgPut] {
        border: 0px solid red;
        position: absolute;
        left: 0px;
        top: 0px;
        opacity: 0;
        height: 36px;
        width: 200px;
    }

    input[id=addImgPut] :hover {
        cursor: pointer;
    }
</style>
